<?php

session_start();

require_once("db.php");
require_once("show_number.php");
require_once("show_problem.php");

date_default_timezone_set("America/New_York");

$seed = $_REQUEST["seed"];
if(strlen($seed)!=0)srand($seed);

$userid = $_SESSION["userid"];
if(GetUserInfo($userid, $userinfo)){
	$left_mess = "<a href='index.php'>Home</a> ";
	$left_mess .= "<span style='padding-left:20px'><a href='stats.php'>Stats</a></span>";
	$right_mess = "Welcome ".$userinfo["first_name"]."!";
	$right_mess .= "  <a href='logout.php'>Logout</a>";
}else{
	$left_mess = "<a href='index.php'>Home</a> ";
	$right_mess = "<a href='register.php'>Create account</a> / <a href='login.php'>Login</a><br>\n";
}

?>

<HTML>

<HEAD>
<TITLE>Multiplication Table Memory Burner</TITLE>
<LINK rel="stylesheet" href="styles.css">
</HEAD>

<BODY>
<table width="100%" class="lime">
	<tr>
		<td align="left"><i><?=$left_mess?></i></td>
		<td align="right"><i><?=$right_mess?></i></td>
	</tr>
</table>

